<!-- include tpl=head_lay -->
<script type="text/javascript" src="{#js#}/jscolor/jscolor.js"></script>
<form method="post" class="layui-form" id='gdsetting' onsubmit="return $.admin_gd.save()">
<!-- if $id -->
<input type="hidden" id="id" name="id" value="{$id}" />
<!-- /if -->
<div class="layui-card">
	<div class="layui-card-body">
		<div class="layui-form-item">
			<label class="layui-form-label">
				名称
			</label>
			<div class="layui-input-block">
				<input type="text" name="title" id="title" value="{$rs.title}" placeholder="{lang用于后台管理}" class="layui-input" />
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang标识}
			</label>
			<div class="layui-input-inline default-auto">
				<input type="text" id="identifier" name="identifier" class="layui-input{if $id} layui-btn-disabled{/if}" value="{$rs.identifier}"{if $id} disabled{/if} />
			</div>
			<!-- if !$id -->
			<div class="layui-input-inline auto gray lh38">{lang标识必须是唯一的，添加后不能修改}</div>
			<!-- /if -->
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang图片宽高}
			</label>
			
			<div class="layui-input-inline" style="width:80px">
				<input type="text" id="width" name="width" class="layui-input" value="{$rs.width}" />
			</div>
			<div class="layui-form-mid">-</div>
			<div class="layui-input-inline" style="width:80px">
				<input type="text" id="height" name="height" class="layui-input" value="{$rs.height}" />
			</div>
			<div class="layui-input-inline auto gray lh38">{lang设置宽度及高度，仅支持数字，不限请设为0}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang水印}
			</label>
			<div class="layui-input-inline default-auto">
				<input type="text" id="mark_picture" name="mark_picture" class="layui-input" value="{$rs.mark_picture}" />
			</div>
			<div class="layui-input-inline auto">
				<div class="layui-btn-group">
					<input type="button" value="{lang选择}" onclick="phpok_pic('mark_picture')" class="layui-btn" />
					<input type="button" value="{lang预览}" onclick="phpok_pic_view('mark_picture')" class="layui-btn" />
					<input type="button" value="{lang清空}" onclick="$('#mark_picture').val('');" class="layui-btn layui-btn-warm" />
				</div>
			</div>
			<div class="layui-input-inline auto gray lh38">{lang设置水印图片，这里推荐使用PNG透明水印}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang水印位置}
			</label>
			<div class="layui-input-inline default-auto">
				<table>
				<tr>
					<td><input type="radio" name="mark_position" id="mark_position_1" value="top-left"{if $rs.mark_position == "top-left"} checked{/if} title="{lang左上}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_2" value="top-middle"{if $rs.mark_position == "top-middle"} checked{/if} title="{lang中上}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_3" value="top-right"{if $rs.mark_position == "top-right"} checked{/if} title="{lang右上}" /></td>
				</tr>
				<tr>
					<td><input type="radio" name="mark_position" id="mark_position_4" value="middle-left"{if $rs.mark_position == "middle-left"} checked{/if} title="{lang左中}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_5" value="middle-middle"{if $rs.mark_position == "middle-middle"} checked{/if} title="{lang中间}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_6" value="middle-right"{if $rs.mark_position == "middle-right"} checked{/if} title="{lang右中}" /></td>
				</tr>
				<tr>
					<td><input type="radio" name="mark_position" id="mark_position_7" value="bottom-left"{if $rs.mark_position == "bottom-left"} checked{/if} title="{lang左下}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_8" value="bottom-middle"{if $rs.mark_position == "bottom-middle"} checked{/if} title="{lang中下}" /></td>
					<td><input type="radio" name="mark_position" id="mark_position_9" value="bottom-right"{if $rs.mark_position == "bottom-right" || !$rs.mark_position} checked{/if} title="{lang右下}" /></td>
				</tr>
				</table>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang透明度}
			</label>
			<div class="layui-input-inline default-auto">
				<select name="trans" id="trans">
					<option value="0"{if !$rs.trans} selected{/if}>{lang完全透明}</option>
					<option value="10"{if $rs.trans == "10"} selected{/if}>10</option>
					<option value="20"{if $rs.trans == "20"} selected{/if}>20</option>
					<option value="30"{if $rs.trans == "30"} selected{/if}>30</option>
					<option value="40"{if $rs.trans == "40"} selected{/if}>40</option>
					<option value="50"{if $rs.trans == "50"} selected{/if}>50{lang（半透明）}</option>
					<option value="60"{if $rs.trans == "60"} selected{/if}>60</option>
					<option value="70"{if $rs.trans == "70"} selected{/if}>70</option>
					<option value="80"{if $rs.trans == "80"} selected{/if}>80</option>
					<option value="90"{if $rs.trans == "90"} selected{/if}>90</option>
					<option value="100"{if $rs.trans == "100"} selected{/if}>{lang不透明}</option>
				</select>
			</div>
			<div class="layui-input-inline auto gray lh38">{lang仅JPG水印有效，建议设为60}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang图片质量}
			</label>
			<div class="layui-input-inline default-auto">
				<select id="quality" name="quality">
					<option value="60"{if $rs.quality == "60"} selected{/if}>{lang较小文件}</option>
					<option value="80"{if $rs.quality == "80" || !$rs.quality} selected{/if}>{lang高质量}</option>
					<option value="100"{if $rs.quality == "100"} selected{/if}>{lang百分百精度}</option>
				</select>
			</div>
			<div class="layui-input-inline auto gray lh38">{lang仅JPG图片有效，建议设为高质量，兼顾大小及精度}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang缩图方式}
			</label>
			<div class="layui-input-inline default-auto">
				<input type="radio" name="cut_type" title="{lang缩放法}" value="0"{if !$rs.cut_type} checked{/if} />
				<input type="radio" name="cut_type" title="{lang裁剪法}" value="1"{if $rs.cut_type} checked{/if} />
			</div>
			<div class="layui-input-inline auto gray lh38">{lang建议大图用缩放法，小图用裁剪法}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang背景颜色}
			</label>
			<div class="layui-input-inline default-auto">
				<input type="text" id="bgcolor" name="bgcolor" value="{$rs.bgcolor}" class="layui-input color {pickerClosable:true}" />
			</div>
			<div class="layui-input-inline auto gray lh38">{lang即填充色，默认为白色}</div>
		</div>		
	</div>
</div>
<div class="clear"></div>
<div class="submit-info">
	<div class="layui-container center">
		<input type="submit" value="{lang提交}" class="layui-btn layui-btn-lg layui-btn-danger" />
		<input type="button" value="{lang取消关闭}" class="layui-btn layui-btn-lg layui-btn-primary" onclick="$.admin.close()" />
	</div>
</div>

</form>
<!-- include tpl=foot_lay -->